package cn.exrick.xboot.enterpriseUser.controllerImp

import cn.exrick.xboot.base.entity.Inform
import cn.exrick.xboot.base.entity.Message
import cn.exrick.xboot.base.service.IInformService
import cn.exrick.xboot.base.service.IMessageService
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.enterpriseUser.controller.IEnterpriseUserController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class IInformController : IEnterpriseUserController.IInform {



    @Autowired
    private lateinit var iInformService: IInformService

    @Autowired
    private lateinit var iMessageService: IMessageService

    override fun getMyInfo(pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iInformService.getMyInfo(pageVo)
    }

    override fun sendMessage(message: Message): Result<Any?>? {

        return iMessageService.sendMessage(message)
    }

    override fun getMyInfoDetail(id: String?): Result<Inform>? {

        return iInformService.getMyInfoDetail(id)
    }

    override fun getMyInfoCount(): Result<Int> {

        return iInformService.getMyInfoCount()
    }
}